package com.dan.inter.web;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.dan.inter.service.GaoDeMapService;

/**
 * @ClassName:  GaoDeMapController   
 * @Description:高德地图map
 * @author: Android_Robot  
 * @date:   2017年7月20日 下午2:07:48   
 *
 */
@RestController
@RequestMapping("/geo")
public class GaoDeMapController {

	@Autowired
	private GaoDeMapService gaoDeMapService;
	
	/**
	 * @Title: pathPlanningCon   
	 * @Description: 路径规划  
	 * @param: @param paramMap
	 * @param: @return
	 * @param: @throws Exception      
	 * @return: String      
	 * @throws
	 */
	@RequestMapping(value="/pathplan",method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
	public String pathPlanningCon(Map<String, String> paramMap) throws Exception{
		String pathPlanningConByMap = gaoDeMapService.pathPlanningConByMap(paramMap);
		return pathPlanningConByMap;
	}
	
	/**
	 * @Title: getCoordinateByAddress   
	 * @Description:根据地址获取坐标值
	 * @param: @param paramMap
	 * @param: @return
	 * @param: @throws Exception      
	 * @return: String      
	 * @throws
	 */
	@RequestMapping(value="/coordinate",method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
	public String getCoordinateByAddress(Map<String,String> paramMap) throws Exception{
		String coordinateByAddress = gaoDeMapService.getCoordinateByAddress(paramMap);
		return coordinateByAddress;
	}
	
	/**
	 * @throws Exception 
	 * @Title: getUserLocation   
	 * @Description: TODO(这里用一句话描述这个方法的作用)   
	 * @param: @param paramMap
	 * @param: @return      
	 * @return: String      
	 * @throws
	 */
	@RequestMapping(value="/UserLocation",method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
	public String getUserLocation(Map<String,String> paramMap) throws Exception{
		String userLocation = gaoDeMapService.userLocation(paramMap);
		return userLocation;
	}
}
